home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19990725-20000114
/
000097_news@columbia.edu _Tue Sep 14 18:21:57 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id SAA02152
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 14 Sep 1999 18:21:56 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id SAA14955
for kermit.misc@watsun.cc.columbia.edu; Tue, 14 Sep 1999 18:10:27 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: How do I pass Kermit parameters?
Date: 14 Sep 1999 22:10:25 GMT
Organization: Columbia University
Message-ID: <7rmh4h$ej8$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <7rm5g7$v0a$1@nnrp1.deja.com>, <dixonan@my-deja.com> wrote:
: I want to pass Kermit parameters from my Visual Basic program.
:
: Example: If the user wants info about product 18, I want Kermit to
: submit a program on an alpha machine which will get the info for
: product 18.
:
: In Visual Basic 6.0 I'm shelling the command...
: f:\winappl.95\k95\k95 d:login.ksc
:
: (d:login.ksc is the script I've written which runs on an NT box)
:
: The script runs fine I just don't know where/how to tell it to run for
: product 18.
:
The methods for passing command-line arguments to a script are a bit
awkward, since K95 (and C-Kermit 6.0, upon which it is based) have
their own command-line arguments. All of this will be simplified in the
next releases (C-Kermit 7.0 and K95 1.1.18), but for the time being, you
have two choices. The first one is:
<path>k95 <name-of-script-file> = <arg1> <arg2> ...
The "=" is a K95 / C-Kermit command-line argument meaning "ignore
everything that follows but put it in the command-line argument array,"
which is described on p.353 and p.469 of "Using C-Kermit". But then your
script has to loop through the command-line argument array looking for the
"=" sign, and then pick up its own arguments after the "=" sign. Example:
f:\winappl.95\k95\k95 d:myscript.ksc = 18
where myscript.ksc might contain:
undef product
for \%i 1 \v(args)-1 1 {
xif equal {\&@[\%i]} {=} {
assign product \&@[\%i+1]
break
}
}
if not def product stop 1 Product number required
echo product = "\m(product)"
The other method would be to use the -C "commandlist" construction:
f:\winappl.95\k95\k95 -C "define product 18, take d:myscript.ksc"
Using either method, your script can refer to the product code as
\m(product).
- Frank